<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript">
 function chk(){
	  
	 location.href="chk?id="+join.member_id.value; 
} 
function checkMe()
{
	var id=join.member_id.value;
	var pw=join.member_pw.value;
	var name=join.member_name.value;
	var mobile=join.member_mobile.value;
	var email=join.member_email.value;

	if(id.length == 0){
		alert("아이디를 입력하세요");
		return false;
	}else if(pw.length == 0){
		alert("비밀번호를 입력하세요");
		return false;
	}else if(name.length == 0){
		alert("이름을 입력하세요");
		
		return false;
	}else if(mobile.length == 0){
		alert("전화번호를 입력하세요");
		
		return false;
	}else if(email.length == 0){
		alert("이메일을 입력하세요");		
		return false;
	}
	
  if (document.join.member_pw.value == document.join.member_pw1.value)
  {
	  document.join.member_pw.value=document.join.member_pw1.valu;
    document.join.submit();
  }
  else{
    alert("비밀번호 확인해라");
  }
  return true;
}

</script>
<title>Insert title here</title>
</head>
<body>
	<form action="/food/member/joinprocess" method="get" name="join">
		<table>
			<tr>
				<td>아이디</td><td><input type="text" name="member_id"></td> 
				<td><input type="button" value="중복확인" onClick="chk()">
			</tr>
			<tr>
				<td>비밀번호</td><td><input type="password" name="member_pw" ></td>
				<td>비밀번호 확인</td><td><input type="password" name="member_pw1"></td>
		
			</tr>
			<tr>
				<td>이름</td><td><input type="text" name="member_name"></td>
				</tr>
			<tr>
				<td>모바일</td><td><input type="text" name="member_mobile"></td>
			</tr>
			<tr>
				<td>이메일</td><td><input type="text" name="member_email"></td>
			</tr>
		</table>
		<table>
		<tr><td><input type="button" onClick="checkMe()" value="회원가입"></td>
		<td><input type="button" value="가입취소" onclick="location.href='main'"></td>
		</tr>
		
		</table>
	</form>
</body>
</html>